.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = all){
    border:1px solid @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        border:0;
        position: relative;
        &:after{
            content: "";
            width: 200%;
            height: 200%;
            position: absolute;
            top: 0;
            left: 0;
            border: 1px solid @color;
            -webkit-transform: scale(0.5);
            -webkit-transform-origin: 0 0;
            padding: 1px;
            -webkit-box-sizing: border-box;
            pointer-events: none;
        }
    }
}
.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = all) and (@radius > 1px){
    border-radius: @radius;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        &:after{
            border-radius: @radius;
        }
    }
}
.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = top){
    border-top:1px solid @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        border-top:none;
        background-repeat: repeat-x;
        background-size: 100% 1px;
        background-position: left top;
        background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.5,transparent),color-stop(0.5,@color));
    }
}
.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = bottom){
    border-bottom:1px solid @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        border-bottom:none;
        background-repeat: repeat-x;
        background-size: 100% 1px;
        background-position: left bottom;
        background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0.5,transparent),color-stop(0.5,@color))
    }
}
.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = left){
    border-left:1px solid @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        border-left:none;
        background-repeat: repeat-y;
        background-size: 1px 100%;
        background-position: left top;
        background-image: -webkit-gradient(linear,right top,left top,color-stop(0.5,transparent),color-stop(0.5,@color))
    }
}
.border-1px(@direction:all,@color:#e0e0e0,@radius:0)
when (@direction = right){
    border-right:1px solid @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2){
        border-right:none;
        background-repeat: repeat-y;
        background-size: 1px 100%;
        background-position: right top;
        background-image: -webkit-gradient(linear,left top,right top,color-stop(0.5,transparent),color-stop(0.5,@color))
    }
}